package com.hg.chapter2.profile;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

@Configuration
//生成两个对象
public class MyProfileConfig {
    @Bean
    @Profile("dev")
    public MyProfile dev(){
        return new MyProfile("dev");
    }

    @Bean
    @Profile("prod")
    public MyProfile prod(){
        return new MyProfile("prod");
    }
}
